<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <h3 class="panel-title">执行质检</h3>
    </div>
    <div class="panel-body">
        <form id="execute-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <h4 class="panel-title">报工信息</h4>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-sm-4">小工单计划编码:</label>
                                <div class="col-sm-8">
                                    <p class="form-control-static">{$report.allocation.plan.plan_code|default='--'}</p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-sm-4">订单名称:</label>
                                <div class="col-sm-8">
                                    <p class="form-control-static">{$report.allocation.order.order_name|default='--'}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-sm-4">工序:</label>
                                <div class="col-sm-8">
                                    <p class="form-control-static">{$report.allocation.process.name|default='--'}</p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-sm-4">产品型号:</label>
                                <div class="col-sm-8">
                                    <p class="form-control-static">{$report.allocation.model.name|default='--'}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-sm-4">报工数量:</label>
                                <div class="col-sm-8">
                                    <p class="form-control-static">{$report.quantity}</p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label col-sm-4">报工员:</label>
                                <div class="col-sm-8">
                                    <p class="form-control-static">{$report.user.nickname|default='--'}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h4 class="panel-title">质检标准</h4>
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-sm-2">标准名称:</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">{$standard.name|default='--'}</p>
                        </div>
                    </div>
                </div>
            </div>

            <div class="panel panel-success">
                <div class="panel-heading">
                    <h4 class="panel-title">检查项目</h4>
                </div>
                <div class="panel-body">
                    <div id="check-items-container">
                        <!-- 检查项目将通过JavaScript动态生成 -->
                    </div>
                </div>
            </div>

            <div class="panel panel-warning">
                <div class="panel-heading">
                    <h4 class="panel-title">质检结果</h4>
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-sm-2">处理方式:</label>
                        <div class="col-sm-10">
                            <select id="c-handle_method" class="form-control" name="row[handle_method]">
                                <option value="0">合格</option>
                                <option value="1">返工</option>
                                <option value="2">报废</option>
                                <option value="3">让步接收</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2">备注:</label>
                        <div class="col-sm-10">
                            <textarea id="c-remark" class="form-control" name="row[remark]" rows="3" placeholder="请输入质检备注"></textarea>
                        </div>
                    </div>
                </div>
            </div>

            <div class="form-group layer-footer">
                <div class="col-sm-12 text-center">
                    <button type="submit" class="btn btn-success btn-embossed">提交质检结果</button>
                    <button type="button" class="btn btn-default btn-embossed" onclick="history.back()">返回</button>
                </div>
            </div>
        </form>
    </div>
</div>

<!-- 隐藏的数据元素，供JavaScript读取 -->
<div id="check-items-data" style="display: none;">{$checkItems|json_encode}</div>

